using System.Collections;
using System.Collections.Generic;
using System.Threading;
using UnityEngine;
using UnityEngine.SceneManagement;

public class GateTransport : MonoBehaviour
{
    [SerializeField] public int TargetSceneID;

    private void OnTriggerStay2D(Collider2D other)
    {
        if (other.tag == "Player")
        {
            if (Input.GetKey(KeyCode.E))
            {
                SceneManager.LoadScene(TargetSceneID);
                Thread.Sleep(200);
            }
        }
    }
}
